Skip to content

Handle Git wildmatch edge cases - #5

Merged
highb merged 3 commits into
highb:masterfrom
jdpace:edge-cases
Jun 4, 2017
Merged

highb merged 3 commits into
highb:masterfrom
jdpace:edge-cases

Conversation

@jdpace

@jdpace jdpace commented May 24, 2017

Copy link
Copy Markdown
Contributor

This PR copies over some edge case handling from the Python pathspec library (cpburnz/python-pathspec#8) that was introduced after this gem was ported.

The original PR goes into more detail but here's an overview of the edge cases:

  • / does NOT match all paths the repo
  • /abs/path matches: abs/path/foo
  • spam matches: spam/, spam/foo
  • spam/two does NOT match: foo/spam/two
  • spam/** does NOT match: foo/spam/bar
  • left/**/right does NOT match: foo/left/bar/right
  • **/spam does match: foo/spam/, foo/spam/bar
  • foo-*-bar does match: foo-hello-bar/baz
  • ~temp-* does match: ~temp-foo/bar
  • *.py does match: bar.py/baz

Comment thread Gemfile
gem 'ruby-debug'
else
gem 'pry', :require => 'pry'
gem 'pry-debugger'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pry-debugger was removed since it doesn't work with Ruby 2.X.

@highb

highb commented May 25, 2017

Copy link
Copy Markdown
Owner

Thanks for submitting this PR! Hm, it looks like something funky is happening in Travis with Ruby 1.8. I'll try checking that out when I have a minute.

@highb

highb commented Jun 4, 2017

Copy link
Copy Markdown
Owner

I didn't realize Ruby 1.8 was so deprecated now. I've updated the Travis testing to the current stable/maintenance Rubies, so I really don't care about the Ruby 1.8 failure.

Thanks again for putting up this PR! I'll get a new Gem version cut soon.

@highb
highb merged commit 750bafe into highb:master Jun 4, 2017
@jdpace
jdpace deleted the edge-cases branch June 7, 2017 15:12
@highb highb modified the milestone: 0.1.0 Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants